package com.wingice.system.exception;

/**
 * @author 胡昊
 * Description:
 * Date: 2021/3/5
 * Time: 10:53
 * Mail: huhao9277@gmail.com
 */
public enum SysBusinessCode {


    ROLE_PERMISSION_DENY(200000, "无权操作角色"),
    RESOURCE_PERMISSION_DENY(200001, "无权操作资源"),
    ROLE_KEY_CONFLICT_ERROR(200002, "角色关键字冲突"),
    USERNAME_EXIST_ERROR(200003, "用户名已存在"),

    ID_LIST_EMPTY_ERROR(300001, "id列表不能为空"),
    USERNAME_EMPTY_ERROR(300002, "id列表不能为空"),
    PASSWORD_EMPTY_ERROR(300003, "密码不能为空"),
    ID_EMPTY_ERROR(300004, "id不能为空"),
    ROLE_NAME_EMPTY_ERROR(300005, "角色名称不能为空"),
    ROLE_KEY_EMPTY_ERROR(300006, "角色标识符不能为空"),
    ROLE_TYPE_NOT_EXIST_ERROR(300007, "角色类型不能为空"),
    RESOURCE_NAME_EMPTY_ERROR(300008, "资源名称不能为空"),
    RESOURCE_PERMISSION_EMPTY_ERROR(300009, "资源标识符不能为空"),
    PARENT_ID_EMPTY_ERROR(300010, "父id不能为空"),
    USER_ID_EMPTY_ERROR(300011, "用户id不能为空"),
    ROLE_ID_LIST_NOT_EXIST_ERROR(300012, "角色id列表不存在"),
    ROLE_ID_EMPTY_ERROR(300013, "角色id不能为空"),
    RESOURCE_ID_LIST_NOT_EXIST_ERROR(300014, "资源id列表不存在"),
    MENU_NAME_EMPTY_ERROR(300015, "菜单名称不能为空"),
    MENU_TYPE_EMPTY_ERROR(300016, "菜单类型不能为空"),
    MENU_PATH_EMPTY_ERROR(300017, "菜单路径不能为空"),
    MENU_ICON_EMPTY_ERROR(300018, "菜单图标不能为空"),
    PARENT_ID_NOT_EXIST_ERROR(30019, "父id不存在"),
    MENU_ID_EMPTY_ERROR(300020, "菜单id不能为空"),
    MENU_ID_LIST_NOT_EXIST_ERROR(300021, "菜单id列表不存在"),
    USER_ID_LIST_NOT_EXIST_ERROR(300022, "用户id列表不存在"),
    DIS_NAME_EMPTY_ERROR(300023, "菜单显示名称不能为空"),
    DICTIONARY_CODE_NOT_EXIST(300024, "字典编码不能为空"),
    ID_NOT_EXIST(300025, "id不能为空"),
    DICTIONARY_ID_NOT_EXIST(300026, "字典类型id不能为空"),
    DICTIONARY_ITEM_NAME_NOT_EXIST(300027, "字典项名称不能为空"),
    SYS_DICTIONARY_ID_NOT_EXIST(300028, "字典ID不存在"),
    OAUTH_CLIENT_CLIENT_ID_EMPTY_ERROR(300029, "clientId不能为空"),
    OAUTH_CLIENT_SECRET_EMPTY_ERROR(300030, "clientSecret不能为空"),
    OAUTH_CLIENT_AUTHORIZED_GRANT_TYPES_EMPTY_ERROR(300031, "authorizedGrantTypes不能为空"),
    OAUTH_CLIENT_NAME_EMPTY_ERROR(300032, "clientName不能为空"),
    OAUTH_CLIENT_ID_EMPTY_ERROR(300033, "oauthClient id列表不存在"),
    RESOURCE_SHOW_EMPTY_ERROR(300034, "资源是否显示不能为空"),
    ILLEGAL_ROLE_KEY(300035, "非法角色标识符"),
    INNER_ROLE_DELETE_FORBIDDEN(300036, "内置角色不允许删除"),
    ILLEGAL_RESOURCE_KEY(300037, "非法资源权限"),
    PRIVATE_KEY_EMPTY_ERROR(300038, "私钥不能为空"),
    PUBLIC_KEY_EMPTY_ERROR(300039, "私钥不能为空");

    private Integer code;
    private String msg;

    SysBusinessCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
